from selenium.webdriver.common.by import By

from base import Base
class Page(Base):
    def jianzhi(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="android:id/text1" and @text="减脂"]')
        ele=self.find_ele(loc)
        return ele
    def chongzhi(self):
        loc=(By.ID,'com.xiachufang:id/tv_join')
        ele=self.find_ele(loc)
        return ele
    def gouxuan(self):
        loc=(By.CLASS_NAME,'android.widget.CheckBox')
        ele=self.find_ele(loc)
        return ele
    def fanhui(self):
        loc=(By.ACCESSIBILITY_ID,'返回')
        ele=self.find_ele(loc)
        return ele
    def xiahua(self):
        self.huadong(517,1535,517,568)
    def dianjitupian(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().resourceId("com.xiachufang:id/iv_img").instance(0)')
        ele=self.find_ele(loc)
        return ele
    def qq(self):
        self.qingqiao(484,92)
    def shangdian(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="android:id/text1" and @text="商店"]')
        ele=self.find_ele(loc)
        return ele